3.487 \(\int (e \sec (c+d x))^{-n} (a+i a \tan (c+d x))^n \, dx\)

Optimal. Leaf size=37 \[ -\frac {i (a+i a \tan (c+d x))^n (e \sec (c+d x))^{-n}}{d n} \]

[Out]

-I*(a+I*a*tan(d*x+c))^n/d/n/((e*sec(d*x+c))^n)

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.036, Rules used = {3488} \[ -\frac {i (a+i a \tan (c+d x))^n (e \sec (c+d x))^{-n}}{d n} \]

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[c + d*x])^n/(e*Sec[c + d*x])^n,x]

[Out]

((-I)*(a + I*a*Tan[c + d*x])^n)/(d*n*(e*Sec[c + d*x])^n)

Rule 3488

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(d
*Sec[e + f*x])^m*(a + b*Tan[e + f*x])^n)/(a*f*m), x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 + b^2, 0] &
& EqQ[Simplify[m + n], 0]

Rubi steps

\begin {align*} \int (e \sec (c+d x))^{-n} (a+i a \tan (c+d x))^n \, dx &=-\frac {i (e \sec (c+d x))^{-n} (a+i a \tan (c+d x))^n}{d n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 37, normalized size = 1.00 \[ -\frac {i (a+i a \tan (c+d x))^n (e \sec (c+d x))^{-n}}{d n} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[c + d*x])^n/(e*Sec[c + d*x])^n,x]

[Out]

((-I)*(a + I*a*Tan[c + d*x])^n)/(d*n*(e*Sec[c + d*x])^n)

________________________________________________________________________________________

fricas [B]  time = 0.66, size = 84, normalized size = 2.27 \[ -\frac {i \, e^{\left (i \, d n x + i \, c n + n \log \left (\frac {2 \, e e^{\left (i \, d x + i \, c\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right ) + n \log \left (\frac {a}{e}\right )\right )}}{d n \left (\frac {2 \, e e^{\left (i \, d x + i \, c\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{n}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))^n/((e*sec(d*x+c))^n),x, algorithm="fricas")

[Out]

-I*e^(I*d*n*x + I*c*n + n*log(2*e*e^(I*d*x + I*c)/(e^(2*I*d*x + 2*I*c) + 1)) + n*log(a/e))/(d*n*(2*e*e^(I*d*x
+ I*c)/(e^(2*I*d*x + 2*I*c) + 1))^n)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n}}{\left (e \sec \left (d x + c\right )\right )^{n}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))^n/((e*sec(d*x+c))^n),x, algorithm="giac")

[Out]

integrate((I*a*tan(d*x + c) + a)^n/(e*sec(d*x + c))^n, x)

________________________________________________________________________________________

maple [C]  time = 1.00, size = 874, normalized size = 23.62 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(d*x+c))^n/((e*sec(d*x+c))^n),x)

[Out]

-I/n/d*exp(1/2*n*(I*Pi*csgn(I*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c)))*csgn(I*e)*csgn(I*exp(I*(d*x+c))/(exp(2*I*
(d*x+c))+1))-I*Pi*csgn(I*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c)))^2*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))-
I*Pi*csgn(I/(exp(2*I*(d*x+c))+1))*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))^2-I*Pi*csgn(I*exp(I*(d*x+c)))*cs
gn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))^2-I*csgn(I*exp(2*I*(d*x+c))/(exp(2*I*(d*x+c))+1))*csgn(I*a/(exp(2*I*
(d*x+c))+1)*exp(2*I*(d*x+c)))*csgn(I*a)*Pi+I*Pi*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))^3-I*csgn(I*exp(2*I
*(d*x+c)))*csgn(I*exp(2*I*(d*x+c))/(exp(2*I*(d*x+c))+1))*Pi*csgn(I/(exp(2*I*(d*x+c))+1))-I*csgn(I*exp(2*I*(d*x
+c))/(exp(2*I*(d*x+c))+1))^3*Pi-I*csgn(I*a/(exp(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))^3*Pi+I*Pi*csgn(I/(exp(2*I*(d
*x+c))+1))*csgn(I*exp(I*(d*x+c)))*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))-I*csgn(I*exp(2*I*(d*x+c)))^3*Pi-
I*csgn(I*exp(2*I*(d*x+c)))*Pi*csgn(I*exp(I*(d*x+c)))^2+I*Pi*csgn(I*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c)))^3-I*
Pi*csgn(I*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c)))^2*csgn(I*e)+I*csgn(I*exp(2*I*(d*x+c))/(exp(2*I*(d*x+c))+1))*c
sgn(I*a/(exp(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))^2*Pi+I*csgn(I*exp(2*I*(d*x+c))/(exp(2*I*(d*x+c))+1))^2*Pi*csgn(
I/(exp(2*I*(d*x+c))+1))+I*csgn(I*exp(2*I*(d*x+c)))*csgn(I*exp(2*I*(d*x+c))/(exp(2*I*(d*x+c))+1))^2*Pi+2*I*csgn
(I*exp(2*I*(d*x+c)))^2*Pi*csgn(I*exp(I*(d*x+c)))+I*csgn(I*a/(exp(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))^2*csgn(I*a)
*Pi+2*ln(a)-2*ln(e)+2*ln(exp(I*(d*x+c)))))

________________________________________________________________________________________

maxima [B]  time = 0.90, size = 86, normalized size = 2.32 \[ -\frac {i \, a^{n} e^{\left (n \log \left (-\frac {2 i \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - 1\right ) - n \log \left (-\frac {\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - 1\right )\right )}}{d e^{n} n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))^n/((e*sec(d*x+c))^n),x, algorithm="maxima")

[Out]

-I*a^n*e^(n*log(-2*I*sin(d*x + c)/(cos(d*x + c) + 1) + sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 1) - n*log(-sin(d
*x + c)^2/(cos(d*x + c) + 1)^2 - 1))/(d*e^n*n)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.03 \[ \int \frac {{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^n}{{\left (\frac {e}{\cos \left (c+d\,x\right )}\right )}^n} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*tan(c + d*x)*1i)^n/(e/cos(c + d*x))^n,x)

[Out]

int((a + a*tan(c + d*x)*1i)^n/(e/cos(c + d*x))^n, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \begin {cases} x & \text {for}\: n = 0 \\x \left (e \sec {\relax (c )}\right )^{- n} \left (i a \tan {\relax (c )} + a\right )^{n} & \text {for}\: d = 0 \\\int \left (0^{\frac {1}{n}} \sec {\left (c + d x \right )}\right )^{- n} \left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{n}\, dx & \text {for}\: e = 0^{\frac {1}{n}} \\- \frac {i e^{- n} \left (i a \tan {\left (c + d x \right )} + a\right )^{n} \sec ^{- n}{\left (c + d x \right )}}{d n} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))**n/((e*sec(d*x+c))**n),x)

[Out]

Piecewise((x, Eq(n, 0)), (x*(e*sec(c))**(-n)*(I*a*tan(c) + a)**n, Eq(d, 0)), (Integral((0**(1/n)*sec(c + d*x))
**(-n)*(I*a*(tan(c + d*x) - I))**n, x), Eq(e, 0**(1/n))), (-I*e**(-n)*(I*a*tan(c + d*x) + a)**n*sec(c + d*x)**
(-n)/(d*n), True))

________________________________________________________________________________________